<!DOCTYPE html>
<!--
Author: Atef Sami
-->
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=9" />
        <link rel="stylesheet" type="text/css" href="style3.css"/>
        <?php include "jquery.php"; ?>


        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title> Conference Setup</title>
    </head>
    <body>
        <!-- created a legend in order to have all the labels and buttons stored in an organized shape  -->
    <legend><b>Conference Setup</b></legend>
    <!-- created a label followed b a text area in order for the member to enter the specified data  -->
    <label>Long Conference Name:</label>
    <input type="text" size="40" id="LongName" /><br />
    <label>Short Conference Name:</label>
    <input type="text" size="25" id="Shortname" /><br />
    <label>Description:</label><br/>
    <textarea rows="6" cols="70" id="description"></textarea><br/>
    <!-- created a drop down list that states the scientific areas and  added some data to the drop down list (e.g. science fiction part , normally this part gets  this part from the database since it is hardb coded in the database -->
    <label>Scientific area:</label>
    <select id="papertypes">
        <optgroup label="Paper types">
            <?php
            $con = mysql_connect('localhost', 'root', '');
            if (!$con) {
                echo "not connected to local host";
            } else {
                mysql_select_db("mydb", $con);
                $query = mysql_query("SELECT area_of_expertise_text  FROM area_of_expertise ");  //  getting all area of expertis from database and assgning them in a new value
                // fetching  the area of expertise  and insert it in a row then i echo each new row n a seperate line
                while ($row = mysql_fetch_assoc($query)) {
                    echo "<option>" . $row["area_of_expertise_text"] . "</option>";
                }
            }
            ?>
        </optgroup>
    </select><br/>
    <!-- created a drop down list which show a list of all the created conferences in it  -->
    <label>Link to previous conferences:</label>
    <select id="previousconf">
        <optgroup label="previous conferences">
            <?php
            $con = mysql_connect('localhost', 'root', '');
//checking it it connected to database or not
            if (!$con) {
                echo " Not connected in database";
            } else {
                // getting all the names of the created conferences that were stored in database
                mysql_select_db("mydb", $con);
                $query = mysql_query("SELECT long_name FROM conference", $con);
                // putting each conference name in the drop down list and in a new line
                while ($row = mysql_fetch_assoc($query)) {
                    echo "<option>" . $row["long_name"] . "</option>";
                }
            }
            ?>
        </optgroup>
    </select><br/>
    Place: <input type="text" name="place" id="place" value=""/><br/>
    Date : <input type ="text" name ="confdate" id="confdate" onfocus="javascript: init('confdate');" /></br></br>
    <!-- created a table in order to help the user  to choose the required paper types that his conference will support while providing him with an area to set the date -->
    <label><b>Submission types:</b></label><br/>
    <table border="1">
        <tr>
            <th>  </th>
            <th>  </th>
            <th><b>Paper submission date</b></th>
        </tr>
        <tr>
            <!-- created a checkbox for short paper  and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="shortpaper" id="shortpapercheckbox"/></td>
            <td> <label for="shortpaper">Short Paper</label></td>
            <td> <input disabled="true" type="text" size="10" id="shortpapersubmissiondate" onfocus="javascript: init('shortpapersubmissiondate');"/> Date format yyyy-mm-dd</td>
        </tr>
        <tr>
            <!-- created a check box for long paper and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="longpaper" id="longpapercheckbox"/></td>
            <td> <label for="longpaper">Long Paper</label></td>
            <td> <input disabled="true" type="text" size="10" id="longpapersubmissiondate" onfocus="javascript: init('longpapersubmissiondate');"/> Date format yyyy-mm-dd</td>
        </tr>
        <tr>
            <!-- created a check box for Image and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="Image" id="Image"/></td>
            <td> <label for="Image">Images</label></td>
            <td> <input disabled="true" type="text" size="10" id="imagesubmissiondate" onfocus="javascript: init('imagesubmissiondate');"/> Date format yyyy-mm-dd</td>
        </tr>
        <tr>
            <!-- created a check box for video and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="Video" id="Video"/></td>
            <td> <label for="Video">Videos</label></td>
            <td> <input disabled="true" type="text" size="10" id="videosubmissiondate" onfocus="javascript: init('videosubmissiondate');"/> Date format yyyy-mm-dd</td>
        </tr>
        <tr>
            <!-- created a check box for poster and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="Poster" id="Poster"/></td>
            <td> <label for="Poster">Posters</label></td>
            <td> <input disabled="true" type="text" size="10" id="postersubmissiondate" onfocus="javascript: init('postersubmissiondate');"/> Date format yyyy-mm-dd</td>
        </tr>
        <tr>
            <!-- created a check box for Other and gave it an id in order to use it -->
            <td> <input type="checkbox" name="other" id="other"/></td>
            <td> <label for="other">Custom type</label><input disabled="true" type="text" name="custom_type" id="custom_type"/></td>
            <td> <input disabled="true" type="text" size="10" id="othersubmissiondate" onfocus="javascript: init('othersubmissiondate');"/> Date format yyyy-mm-dd</td>
        </tr>
    </table>
    </br>
    <!-- created a table with no borders and inserted the 3 types of committees in it so the member can choose one -->
    <label><b>Committee types:</b></Label><br/>
    <table>
        <tr>
            <th>  </th>
            <th>  </th>
        </tr>
        <tr>
            <!-- created a check box for committee1  and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="committee1" id="committe1checkbox"/></td>
            <td> <label for="committee1">Paper Review Committee</label></td>
        </tr>
        <tr>
            <!-- created a check box for committee2  and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="committee2" id="committe2checkbox"/></td>
            <td> <label for="committee2">Quality Control Committee</label></td>
        </tr>
        <tr>
            <!-- created a check box for committee3  and gave it an id in order to use it in the above script -->
            <td> <input type="checkbox" name="committee3" id="committe3checkbox" /></td>
            <td> <label for="committee3">category review committee</label></td>
        </tr>
        <tr>
            <!-- created a check box for custom committee  and gave it an id in order to use it-->
            <td><input type="checkbox" name="custom_committee" id="custom_committee"/></td>
            <td><label for="custom_committee">Custom committee</label><input disabled="true" type="text" id="custom_text" name="custom_text" value=""/></td>
        </tr>
    </table><br/>
    <!-- created a submit button and gave it an id so i can use it in the script above -->
    <button id="Submitbutton">Submit</button>
    <?php
// End of documentation
    ?>
</body>
</html>
<head>
    <script src="sysJavascript.js" language="javascript"></script>
    <script type="text/javascript" src="calendar.js"></script>
</head>